package com.example.flutter_projectname_getx;

import android.util.Log;

import androidx.annotation.NonNull;

import com.example.flutter_projectname_getx.constant.Constant;

import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;


public class FlutterAndroidCall {

    final static private String TAG = "安卓原生";

    /**
     * 交互处理
     * */
    public static void methodCallHandler(@NonNull MethodCall call, @NonNull MethodChannel.Result result) {
        switch (call.method){
            case Constant.test_code:
                log("接收参数 "+call.arguments);
                break;
            default:
                log("尚未实现此接口"+call.method);
                break;
        }
    }

    /**
     * 只在debug模式打印
     * */
    private static void log(String msg){
        Log.d(TAG, msg);
    }
}
